Skip to content

Delete Image
Beta

Request

Deletes an image by its filename (reference), which is unique per tenant.

Authentication

Requires a valid API key in the X-API-KEY header.

Example

DELETE /images(product-main-front.jpg)
X-API-KEY: your-api-key-here

Response (204 No Content)

Success returns no body.

Important: deletion does not cascade

The image record is removed outright. The deletion is not propagated to the entities that use the image — check numLinks on the image first (GET /images({reference})): if it is greater than zero, the products, variants and categories still referencing the filename will be left pointing at an image that no longer exists. Repoint them via the Catalog API before deleting.

Error Responses

  • 401 Unauthorized: Missing or invalid API key. Returned by the API gateway as { "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }
  • 403 Forbidden: The API key does not have write permissions for this operation. Same body shape as the 401
  • 404 Not Found: No image with the given reference exists for this tenant. The body is the message string, e.g. "Image with reference 'missing.jpg' not found"
  • 409 Conflict: Image is currently being processed and cannot be deleted — { "error": "Image 'product-123.jpg' is currently being processed and cannot be deleted" }
  • 500 Internal Server Error: Technical error (e.g. database unavailable)
Path
referencestringrequired

Image filename (reference), unique per tenant

Headers
X-API-KEYstringrequired

Tenant's API key (required)

curl -i -X DELETE \
  'https://api2.saleslayer.com/dam/images({reference})' \
  -H 'X-API-KEY: string'

Responses

No Content

Response
No content